package com.yic.module.wms.enums;

import com.yic.framework.common.exception.ErrorCode;

/**
 * WMS 错误码枚举类
 * <p>
 * QMS 系统，使用 1_022_000_000 段
 */
public interface ErrorCodeConstants {

    // ==========  仓库模块 1_022_000_000 ==========
    ErrorCode WAREHOUSE_NOT_EXISTS = new ErrorCode(1_022_000_000, "仓库信息不存在");
    ErrorCode WAREHOUSE_NAME_EXISTS = new ErrorCode(1_022_000_001, "仓库名称已存在");
    ErrorCode WAREHOUSE_CODE_EXISTS = new ErrorCode(1_022_000_002, "仓库代码已存在");
    ErrorCode WAREHOUSE_NOT_DEL_EDIT = new ErrorCode(1_022_000_003, "当前仓库下存在库区，不允许删除或变更");

    // ==========  库区模块 1_022_001_000 ==========
    ErrorCode WAREHOUSE_AREA_NOT_EXISTS = new ErrorCode(1_022_001_000, "库区信息不存在");
    ErrorCode WAREHOUSE_AREA_NAME_EXISTS = new ErrorCode(1_022_001_001, "库区名称已存在");
    ErrorCode WAREHOUSE_AREA_CODE_EXISTS = new ErrorCode(1_022_001_002, "库区代码已存在");
    ErrorCode WAREHOUSE_AREA_NOT_CHANGE = new ErrorCode(1_022_001_003, "当前仓库不允许变更库区");
    ErrorCode WAREHOUSE_AREA_NOT_DEL_EDIT = new ErrorCode(1_022_001_004, "当前库区下存在库位，不允许删除或变更");
    ErrorCode WAREHOUSE_AREA_NOT_EMPTY = new ErrorCode(1_022_001_005, "库区已开启，必须指定库区");

    // ==========  库位模块 1_022_002_000 ==========
    ErrorCode WAREHOUSE_LOCATION_NOT_EXISTS = new ErrorCode(1_022_002_000, "库位信息不存在");
    ErrorCode WAREHOUSE_LOCATION_NAME_EXISTS = new ErrorCode(1_022_002_001, "库位名称已存在");
    ErrorCode WAREHOUSE_LOCATION_CODE_EXISTS = new ErrorCode(1_022_002_002, "库位代码已存在");
    ErrorCode WAREHOUSE_LOCATION_NOT_CHANGE = new ErrorCode(1_022_001_003, "当前库区不允许变更库位");
    ErrorCode WAREHOUSE_LOCATION_NOT_EMPTY = new ErrorCode(1_022_001_004, "库位已开启，必须指定库位");

    // ==========  产品仓储信息模块 1_022_003_000 ==========
    ErrorCode ITEM_WAREHOUSE_NOT_EXISTS = new ErrorCode(1_022_003_000, "产品仓储信息不存在");
    ErrorCode ITEM_WAREHOUSE_EXISTS = new ErrorCode(1_022_003_001, "产品仓储信息已存在");
    ErrorCode ITEM_WAREHOUSE_STOCK_LACK = new ErrorCode(1_022_003_002, "库存数量不足");

    ErrorCode ITEM_WAREHOUSE_NOT_STRATEGY = new ErrorCode(1_022_003_003, "不识别的库存策略，请联系管理员处理");

    // ==========  库存明细信息模块 1_022_004_000 ==========
    ErrorCode ITEM_WAREHOUSE_INFO_NOT_EXISTS = new ErrorCode(1_022_004_000, "库存明细信息不存在");
    ErrorCode ITEM_WAREHOUSE_INFO_NOT_SUFFICIENT = new ErrorCode(1_022_004_001, "库存不足，结余库存'{}'，本次出库'{}'");

    ErrorCode ITEM_WAREHOUSE_INFO_HANDLE_ERROR = new ErrorCode(1_022_004_002, "库存操作异常");

    ErrorCode ITEM_WAREHOUSE_INFO_USED = new ErrorCode(1_022_004_003, "入库产品已被使用，无法操作");
    // ==========  生产入库单模块 1_022_005_000 ==========
    ErrorCode PRODUCE_IN_NOT_EXISTS = new ErrorCode(1_022_005_000, "生产入库单信息不存在");
    ErrorCode PRODUCE_IN_NOT_CHANGE= new ErrorCode(1_022_005_001, "生产入库单不允许变更");
    ErrorCode PRODUCE_IN_CODE_EXISTS= new ErrorCode(1_022_005_002, "生产入库单号已存在");
    ErrorCode PRODUCE_IN_GT_PRODUCE= new ErrorCode(1_022_005_003, "生产入库数量不允许大于生产工单排产数量");

    // ==========  生产出库单模块 1_022_006_000 ==========
    ErrorCode PRODUCE_OUT_NOT_EXISTS = new ErrorCode(1_022_006_000, "生产出库单信息不存在");
    ErrorCode PRODUCE_OUT_NOT_CHANGE= new ErrorCode(1_022_006_001, "生产出库单不允许变更");
    ErrorCode PRODUCE_OUT_CODE_EXISTS= new ErrorCode(1_022_006_002, "生产出库单号已存在");
    ErrorCode PRODUCE_OUT_GT_PRODUCE= new ErrorCode(1_022_006_003, "生产出库数量不允许大于生产工单已入库数量");

    // ==========  erp完工入库模块 1_022_007_000 ==========
    ErrorCode ERP_PRODUCE_IN_NOT_EXISTS = new ErrorCode(1_022_007_000, "ERP完工入库信息不存在");
    ErrorCode ERP_PRODUCE_IN_CODE_EXISTS = new ErrorCode(1_022_007_001, "入库单号已存在");
    ErrorCode ERP_PRODUCE_IN_GREATER_PLAN_AMOUNT = new ErrorCode(1_022_007_002, "工单\"{}\"允收数量超过预计产量，已入库\"{}\"，未入库\"{}\"");
    ErrorCode ERP_PRODUCE_IN_FACTORY_NOT_EXISTS = new ErrorCode(1_022_007_003, "工厂信息不存在");
    ErrorCode ERP_PRODUCE_IN_ITEM_NOT_EXISTS = new ErrorCode(1_022_007_004, "产品信息不存在");
    ErrorCode ERP_PRODUCE_IN_NOT_CANCEL = new ErrorCode(1_022_007_005, "当前单据不允许撤销");
    ErrorCode ERP_PRODUCE_IN_NOT_EQUAL_PRODUCE = new ErrorCode(1_022_007_005, "工单\"{}\"入库数量与明细数量不符，本次入库数量\"{}\"，完工明细数量\"{}\"");
    // ==========  领料申请单模块 1_022_008_000 ==========
    ErrorCode RECEIVE_APPLY_NOT_EXISTS = new ErrorCode(1_022_008_000, "领料申请单信息不存在");
    // ==========  领料出库单模块 1_022_009_000 ==========
    ErrorCode RECEIVE_OUT_NOT_EXISTS = new ErrorCode(1_022_009_000, "领料出库单信息不存在");













}

